package service.impl;

import dao.DeptDao;
import dao.impl.DeptDaoimpl;
import pojo.Dept;
import service.DeptService;

import java.util.List;

public class DeptServiceimpl implements DeptService {
    DeptDao deptDao = new DeptDaoimpl();
    public List<Dept> findAll(Dept dept)
    {
        return deptDao.findAll(dept);
    }

    @Override
    public int DeleteDeptById(Integer id) {
        return deptDao.DeleteDeptById(id);
    }

    @Override
    public Dept findByid(Integer id) {
        return deptDao.findByid(id);
    }

    @Override
    public int UpdateDept(Dept dept) {
        return deptDao.UpdateDept(dept);
    }

    @Override
    public int addDept(Dept dept) {
        return deptDao.addDept(dept);
    }
}
